﻿@{
    Layout = "~/Views/Shared/_Main.cshtml";
}
<div class="title-line title-line-red text-left">
    <h4>
        找回用户密码</h4>
</div>
<div class="row">
    <div class="span7">
        <!--表单-->
        <span class="muted">&nbsp;&nbsp;以下每一项均要求填写</span>
        <br />
        <br />
        <form id="form1" action="/account/forgotpassword" method="post" class="form-horizontal">
        <input type="hidden" name="token" />
        @if(ViewBag.Error!= null)
        {
            <label class="alert alert-error">@ViewBag.Error</label>
        }
        <div class="control-group">
            <label class="control-label" for="account">
                帐户</label>
            <div class="controls">
                 <input type="text" name="Username" value="@ViewBag.Username" 
                    class="span4 {required:true,email:true}" placeholder="请输入帐号或邮箱" />
            </div>
        </div>
       <div class="control-group">
            <label class="control-label">
                验证码</label>
            <div class="controls">
                <div class="span3" style="margin-left:0px;">
                    <input type="text" id="txtvaildcode" name="validcode"
                     class="pull-left {required:true,minlength:4,maxlength:4}" 
                     placeholder="请输入右侧验证码" />
                </div>
                <div id="codeimg" style="margin-left: 10px; "> 
                   
                </div>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <br />
                <br />
                <button type="submit" class="btn btn-danger">
                    <i class="icon-lock icon-white"></i>&nbsp;找回密码
                </button>
            </div>
        </div>
        </form>
        <!--#表单-->
    </div>
    <div class="span5">
        <div class="reg-right-box reg-right-box-un">
            <h4>
                请妥善保管好自己的密码，避免给自己带来不便！</h4>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
    <script type="text/javascript">
        var validation = new plug.BindValidCode();
        $(function () {
            validation.BindValidator();
            $('#form1').validate({
                errorClass: "help-inline",
                errorElement: "span",
                highlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                }
            });
        });
        function Refalsh(sender) {
            validation.Refalsh(sender);
        }
    </script>
}